﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Distributors.aspx.cs" Inherits="masterdata_Distributors" %>
<%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager"  TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <div>
        <table id="wsd_inputtable"  >
            <tr >
                <td class="tabletitle"   colspan="6">
                    &nbsp;输入表单
                </td>
            </tr>
            <tr  >
                <td class="tablefield">
                    &nbsp;组织结构
                </td>
                <td nowrap="nowrap" style="width: 180px">
                    <asp:TextBox ID="txtOrg" runat="server" Width="150px" onkeydown="alert('请选择部门');return false;"
                        OnTextChanged="txtOrg_TextChanged"  class="default"></asp:TextBox>
                    <img src="../Resources/Images/search.png" alt="查找" style="cursor: pointer;" onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.ClientID %>&ValueControlId=<%# txtHidOrg.UniqueID %>&SelectType=single','','300','500');" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="txtOrg" ErrorMessage="请选择部门"></asp:RequiredFieldValidator>
                </td>
                <td class="tablefield">
                    &nbsp;经销商代码或公司名称</td>
                <td nowrap="nowrap">
                    <asp:TextBox ID="txtChain" runat="server" Width="150px" MaxLength="150"  class="default"></asp:TextBox>
                </td>
                <td class="tablefield">
                    有效
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList ID="ddlValid" runat="server" CssClass="style1" Width="100">
                        <asp:ListItem Selected="True" Text="全部" Value=""></asp:ListItem>
                        <asp:ListItem Text="有效" Value="1"></asp:ListItem>
                        <asp:ListItem Text="无效" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="5"  style=" text-align:right;"  >
                    <input id="txtHidOrg" type="hidden" runat="server" />
                      <input id="Hidden1" type="hidden" runat="server" />
                    
                    <asp:Button ID="btnQuery" runat="server" class="wsd_button2"  OnClick="btnQuery_Click" Text="查 询" />
                    
                &nbsp;&nbsp; </td>
                        <td> <input class="wsd_button2" name="reset" onclick="clearForm('form1')" size="47" 
                        type="button" value="重  置" /></td>
               
                 
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable" >
            <tr>
                <td class="tabletitle">
                    &nbsp;经销商列表
                </td>
            </tr>
        </table>
        <table id="wsd_listtable">
            <tr>
                <td style="width: 100%">
                    <div id="divScroll"  >
                        <asp:GridView Width="100%" ID="gvChainList" runat="server" AutoGenerateColumns="False" BorderWidth="0"
                            EmptyDataText="<%$ resources:language,lbl_Empty %>"  GridLines="None" EmptyDataRowStyle-Font-Bold="true" PageSize="15"
                            EmptyDataRowStyle-HorizontalAlign="Center" EnableEmptyContentRender="true" OnRowDataBound="gvDistributorsList_RowDataBound"
                            AllowPaging="True" OnPageIndexChanging="gvChainList_PageIndexChanging">
                            <HeaderStyle CssClass="titlist" />
                            <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                            <Columns>     
                                <asp:BoundField DataField="Code" HeaderText="经销商代码" ItemStyle-Width="15%">
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" />
                                  
                                </asp:BoundField>
                                <asp:HyperLinkField  HeaderText="公司名称" Target="_self"  DataTextField="DESCRIPTION" DataNavigateUrlFormatString="distributor_maintain.aspx?did={0}" DataNavigateUrlFields="id" ItemStyle-Width="18%" ControlStyle-Font-Underline="false" />
                                <asp:BoundField DataField="ADDRESS" HeaderText="公司地址" ItemStyle-Width="22%">
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Width="18%" Wrap="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="LINKMAN" HeaderText="联系人" ItemStyle-Width="18%">
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" />
                                </asp:BoundField>
                                <asp:BoundField DataField="TELEPHONE" HeaderText="联系人电话" ItemStyle-Width="18%">
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="有效">
                                    <ItemTemplate>
                                        <b>
                                            <%# (bool)Eval("ACTIVE") ? "<font size='3' color='green'>√</font>" : "<font size='3' color='red'>×</font>"%></b>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" />
                                </asp:TemplateField>
                            </Columns>
                            <RowStyle CssClass="evenline" />
                            <AlternatingRowStyle CssClass="oddline" />
                            <PagerSettings  Visible="false" FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast" PageButtonCount="30" />
                        </asp:GridView>
                        <uc1:GridPager ID="GridPager1" runat="server" Visible="false" />
                    </div>
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable"    >
            <tr>
                <td width="100%" class="tabletitle">
                    <asp:Literal ID="Literal1" runat="server" Text="<%$resources:language,lbl_Operation_Area %>"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="buttonarea"    >
                        <asp:Button ID="btnNewBanner" runat="server" class="wsd_button2" Text="新 增"  CausesValidation="false" OnClick="btnNewBanner_Click" />&nbsp;&nbsp;
                </td>
            </tr>
        </table>
     
        
    </div>
   
</asp:Content>
